﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls; 
using Global;

public class CreateManager
{
	public CreateManager()
	{
		
	}

    //获取具体工厂的方法
    public BaseManager GetManager(int iType)
    {
        BaseManager iBaseManager = null;

        //根据传入参数（创建 类型 ）创建 相应的对象 
        switch (iType)
        {
            case 1:
                {
                    iBaseManager = new RestaurantManager();
                    break;


                }
            case 2:
                {
                    iBaseManager = new TableManager();
                    break;
                }
            case 3:
                {
                    iBaseManager = new OrderManager();
                    break;
                }
            default:
                {
                    return null;

                }

        }
        return iBaseManager;
    }

}
